<!--隐患排查录入-->
<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
	       <li><a href="{:url('hiden/index')}">隐患整改信息</a></li>
		   <li><a href="{:url('hiden/add')}">隐患信息填报</a></li>
		   <li class="active"><a>隐患整改信息编辑</a></li>
	    </ul>
		<form method="post" action="{:url('hiden/editPost')}" id="form">
	          <!--隐患填报单-->
	        <div class="row">
				<ol class="breadcrumb" >
			        <li><a href="#">隐患填报单</a></li>
			    </ol>
			</div>
			<div class="row">
				<div class="form-group col-md-6 col-sm-6">
					<label class="col-sm-4 control-label"">排查部门
					<span style="color:red;">*</span>
					</label>
					<div class="col-sm-8">
					<input id="facId"  type="text"  disabled="disabled"  value="{$hidenInfo['name']}"
						   name="hidenFac" class="form-control" >
					</div>
				</div>
				<div class="form-group col-md-6 col-sm-6">
					<label class="col-sm-4 control-label">排查日期
					<span style="color:red;">*</span>
					</label>
					<div class="col-sm-8">
						<input type="text" class="form-control js-bootstrap-date" id="prdateId" name="hidenTiem" disabled="disabled" value ="{$hidenInfo['hidenTime']}" /> 
					</div>
				</div>
				<div class="form-group col-md-6 col-sm-6 ">
					<label class="col-sm-4 control-label">排查人
					<span style="color:red;">*</span>
					</label>
					<div class="col-sm-8">
						<input type="text" name="hidenPerson" value ="{$hidenInfo['user_nickname']}"
						class="form-control" disabled="disabled" >
					</div>
				</div>
				<div class="form-group col-md-6 col-sm-6 ">
					<label class="col-sm-4 control-label">排查方式
					<span style="color:red;">*</span>
					</label>
					<div class="col-sm-8">
						<select class="form-control" name="hidenPtrStyle" disabled="disabled" >
							<option value="{$hidenInfo['partolStyleID']}">{$hidenInfo['partolStyleName']}</option>
							<option value="综合检查">综合检查</option>
							<option value="专项检查">专项检查</option>
							<option value="季节检查">季节检查</option>
							<option value="节假日及重大活动检查">节假日及重大活动检查</option>	
							<option value="日常检查">日常检查</option>	
							<option value="上级部门检查">上级部门检查</option>
						</select>
					</div>
				</div>
				<div class="form-group col-md-6 col-sm-6 ">
					<label class="col-sm-4 control-label">隐患类别
					<span style="color:red;">*</span>
					</label>
					<div class="col-sm-8">
						<select class="form-control" name="hidenType" disabled="disabled" >
						<option value="{$hidenInfo['dangerTypeID']}">{$hidenInfo['dangerTypeName']}</option>
							<option value="现场管理">现场管理</option>
							<option value="基础管理">基础管理</option>								
						</select>
					</div>
				</div>
				<div class="form-group col-md-6 col-sm-6">
					<label class="col-sm-4  control-label">隐患级别
					<span style="color:red;">*</span>
					</label>
					<div class="col-sm-8">
						<select class="form-control" name="hidenLevel" disabled="disabled" >
						<option value="{$hidenInfo['hidenLevel']}">{$hidenInfo['hidenLevel']}</option>
							<option value="一般">一般</option>
							<option value="重大">重大</option>
						</select>
					</div>
				</div>
				<div class="form-group col-md-6 col-sm-6">
					<label for="inputgsmc" class="col-sm-4  control-label">隐患描述
					<span style="color:red;">*</span>
					</label>
					<div class="col-sm-8">
						<textarea class="form-control" name="hidenInfo" rows="XX" cols="XX" 
						disabled="disabled">{$hidenInfo['hidenInfo']}</textarea>
					</div>
				</div>					
				<div class="form-group col-md-6 col-sm-6">
					<label for="inputgsmc" class="col-sm-4  control-label">上传图片</label>
					<div class="col-sm-8">
						<a href="
							javascript:uploadMultiImage('图片上传','#photos','photos-item-tpl')"
		                        class="btn btn-default">选择图片</a>
					</div>
				</div>
				<div class="form-group col-md-6 col-sm-6 " style="display: none;">
					<label class="col-sm-4 control-label"> 隐患状态
					<span style="color:red;">*</span>
					</label>
					<div class="col-sm-8">
						<input type="text" name="hidenFlag" value ="{$hidenInfo['hidenFlag']}"
						class="form-control" >
					</div>
				</div>
			</div>
			<!--整改通知单-->		
			<div class="row" id="abar_1" style="display: none;">
				<ol class="breadcrumb" >
			        <li><a href="#">整改通知单</a></li>
			    </ol>
			</div>
			<div class="row" id="abar_2"  style="display: none;">
				<div class="form-group col-md-6 col-sm-6" >
		            <label for="input-departID" class="col-sm-4 control-label">部门名称</label>
		            <div class="col-sm-8">
		                <select class="form-control" name="abarDepartID" 
		                id="input-depart_id">
		                    <option value="0">作为一级菜单</option>{$select_category}
		                </select>
		            </div>
		        </div>
				<div class="form-group col-md-6 col-sm-6">
					<label class="col-sm-4  control-label">整改类型</label>
					<div class="col-sm-8">
						<select id = "abar_style_id" class="form-control" name="abarStyle">
							<option value="立即整改">立即整改</option>
							<option value="限期整改">限期整改</option>						
						</select>
					</div>
				</div>
				<div class="form-group col-md-6 col-sm-6">
					<label class="col-sm-4  control-label">整改期限</label>
					<div class="col-sm-8">
						  <input id="abar_time_id" type="text" class="form-control js-bootstrap-date" name="abarbeitungTime" />
					</div>
				</div>						
				<div class="form-group col-md-6 col-sm-6 ">
					<label class="col-sm-4 control-label">整改要求</label>
					<div class="col-sm-8">
						<input id ="abar_request_id" type="text" class="form-control" 
						name = "abarRequest"/>
					</div>
				</div>
			</div>
			<!--整改确认单-->
			<div class="row" id="abar_3"  style="display: none;">
				<ol class="breadcrumb" >
					<li><a href="#">整改确认单</a></li>
				</ol>
			</div>
			<div class="row" id="abar_4"  style="display: none;">
				<div class="form-group col-md-6 col-sm-6 ">
					<label class="col-sm-4 control-label">整改责任人</label>
					<div class="col-sm-8">
						<input id="abar_person_id" type="text" name="abarbeitungPerson" class="form-control"/>
					</div>
				</div>		
				<div class="form-group col-md-6 col-sm-6">
					<label class="col-sm-4 control-label"">整改日期</label>
					<div class="col-sm-8">
						<input id="abar_time_id2" type="text" name="abarTime" class="js-bootstrap-date form-control"/>
					</div>
				</div>
				<div class="form-group col-md-6 col-sm-6 ">
					<label class="col-sm-4 control-label">整改结果</label>
					<div class="col-sm-8">
						<input id="abar_result_id" type="text" name="abarResult" class="form-control">
					</div>
				</div>	
			</div>	
			<!--整改复查单-->
			<div class="row" id="abar_5"  style="display: none;">
				<ol class="breadcrumb" >
					<li><a href="#">整改复查单</a></li>
				</ol>
			</div>	
			<div class="row" id="abar_6"  style="display: none;">
				<div class="form-group col-md-6 col-sm-6 ">
					<label class="col-sm-4 control-label">复查人</label>
					<div class="col-sm-8">
						<input id="review_person_id" type="text" name="reviewPerson" class="form-control">
					</div>
				</div>	
				<div class="form-group col-md-6 col-sm-6">
					<label class="col-sm-4 control-label"">复查日期</label>
					<div class="col-sm-8">
						<input id="review_time_id" type="text" name="reviewTime" class="js-bootstrap-date form-control"/>
					</div>
				</div>	
				<div class="form-group col-md-6 col-sm-6 ">
					<label class="col-sm-4 control-label">复查结果</label>
					<div class="col-sm-8">
						<input id="review_result_id"  type="text" name="reviewResult" class="form-control">
					</div>
				</div>			
				<div class="form-group col-md-6 col-sm-6">
					<label for="inputgsmc" class="col-sm-4  control-label">上传图片</label>
					<div class="col-sm-8">
						<a href="javascript:uploadMultiImage('图片上传','#photos','photos-item-tpl')"
		                        class="btn btn-default">选择图片</a>
					</div>
				</div>
			</div>	
			<div class="row">
				<div class="form-group">
				    <div class="col-sm-offset-2 col-sm-10">
					    <input type="hidden" name="hidenID" value="{$hidenInfo.hidenID}"/>
					    <button type="submit" id="save" 
					            class="btn btn-primary ">提交</button>	            
					    <a class="btn btn-default" href="{:url('hiden/index')}">{:lang('BACK')}</a>
					</div>
			    </div>
		    </div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
	<script src="__STATIC__/js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
	<script src="__STATIC__/js/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
	<script type="text/javascript">	
		var hiden_flag = "{$hidenInfo['hidenFlag']}";
		if(hiden_flag == '已上报'){
			//显示整改通知单
			$("#abar_1").show();
			$("#abar_2").show();

			//禁用整改确认单input标签
			$("#abar_result_id").attr("disabled","disabled");
			$("#abar_time_id2").attr("disabled","disabled");
			$("#abar_person_id").attr("disabled","disabled");
			//禁用整改复查单input标签
			$("#review_person_id").attr("disabled","disabled");
			$("#review_time_id").attr("disabled","disabled");
			$("#review_result_id").attr("disabled","disabled");
		}else if(hiden_flag == '待整改'){
			//显示整改通知单
			$("#abar_1").show();
			$("#abar_2").show();
			//显示整改确认单
			$("#abar_3").show();
			$("#abar_4").show();
			//禁用整改通知单input标签
			$("#input-depart_id").attr("disabled","disabled");
			$("#abar_style_id").attr("disabled","disabled");
			$("#abar_time_id").attr("disabled","disabled");
			$("#abar_request_id").attr("disabled","disabled");
			//禁用整改复查单input标签
			$("#review_person_id").attr("disabled","disabled");
			$("#review_time_id").attr("disabled","disabled");
			$("#review_result_id").attr("disabled","disabled");
			//整改通知单 input 标签赋值
			$("#abar_time_id").val("{$hidenInfo['abarbeitungTime']}");
			$("#abar_request_id").val("{$hidenInfo['abarRequest']}");
		}else if(hiden_flag == '待复查'){
			//显示整改通知单
			$("#abar_1").show();
			$("#abar_2").show();
			//显示整改确认单
			$("#abar_3").show();
			$("#abar_4").show();
			//整改复查单
			$("#abar_5").show();
			$("#abar_6").show();

			//禁用整改通知单input标签
			$("#input-depart_id").attr("disabled","disabled");
			$("#abar_style_id").attr("disabled","disabled");
			$("#abar_time_id").attr("disabled","disabled");
			$("#abar_request_id").attr("disabled","disabled");
			//禁用整改确认单input标签
			$("#abar_result_id").attr("disabled","disabled");
			$("#abar_time_id2").attr("disabled","disabled");
			$("#abar_person_id").attr("disabled","disabled");
			//整改通知单 input 标签赋值
			$("#abar_time_id").val("{$hidenInfo['abarbeitungTime']}");
			$("#abar_request_id").val("{$hidenInfo['abarRequest']}");
			// 整改确认单 input 标签赋值
			$("#abar_result_id").val("{$hidenInfo['abarResult']}");
			$("#abar_person_id").val("{$hidenInfo['abarbeitungPerson']}");
			$("#abar_time_id2").val("{$hidenInfo['abarTime']}");
		}else if(hiden_flag == '已完成'){	
			$("#abar_1").show();
			$("#abar_2").show();
			//显示整改确认单
			$("#abar_3").show();
			$("#abar_4").show();
			//整改复查单
			$("#abar_5").show();
			$("#abar_6").show();
			//禁用整改通知单input标签
			$("#input-depart_id").attr("disabled","disabled");
			$("#abar_style_id").attr("disabled","disabled");
			$("#abar_time_id").attr("disabled","disabled");
			$("#abar_request_id").attr("disabled","disabled");
			//禁用整改复查单input标签
			$("#review_person_id").attr("disabled","disabled");
			$("#review_time_id").attr("disabled","disabled");
			$("#review_result_id").attr("disabled","disabled");
			//禁用=用整改确认单input标签
			$("#abar_result_id").attr("disabled","disabled");
			$("#abar_time_id2").attr("disabled","disabled");
			$("#abar_person_id").attr("disabled","disabled");

			//整改通知单 input 标签赋值
			$("#abar_time_id").val("{$hidenInfo['abarbeitungTime']}");
			$("#abar_request_id").val("{$hidenInfo['abarRequest']}");
			// 整改确认单 input 标签赋值
			$("#abar_result_id").val("{$hidenInfo['abarResult']}");
			$("#abar_person_id").val("{$hidenInfo['abarbeitungPerson']}");
			$("#abar_time_id2").val("{$hidenInfo['abarTime']}");
			//input 标签赋值
			$("#review_person_id").val("{$hidenInfo['reviewPerson']}");
			$("#review_result_id").val("{$hidenInfo['reviewResult']}");
			$("#review_time_id").val("{$hidenInfo['reviewTime']}");
		}
	</script>
</body>
</html>